package yto.freemarker.springbootstudy.entity;

import lombok.*;

import javax.validation.constraints.Min;
import java.io.Serializable;

/**
 * 使用效验的规则
 *
 * @author dongxing
 * @Valid注解的使用
 * @create 2018-04-09 8:53
 **/
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode
public class User implements Serializable{

    private String name;
    @Min(value = 18, message = "未成年禁止入内")
    private Integer age;

}
